<?php
	echo '<?xml version="1.1" ?>';
	include('connection_mysql.inc.php');
	echo '<ecoles>';
	$results = mysql_query("Select * from composante");
	while ($line = mysql_fetch_array($results)){
		echo '<ecole nom="'.$line['nom'].'">';
		
		$resultSections = mysql_query("select * from section where idComposante=".$line['id']);
		while ($lineSection = mysql_fetch_array($resultSections)){
			echo '<section id="'.$lineSection['id'].'" nom="'.$lineSection['nom'].'" />';
		}
		echo '</ecole>';
	}
	echo "</ecoles>";
	
?>
